﻿using System;

namespace LocalOverride.Fiddler
{
    public class Logger : ILogger
    {

        public event EventHandler<NewMessageEventArgs> NewMessage;

        public void OnNewMessage(NewMessageEventArgs e)
        {
            EventHandler<NewMessageEventArgs> handler = NewMessage;
            if (handler != null) handler(this, e);
        }

        public void Log(string message)
        {
            OnNewMessage(new NewMessageEventArgs(message));
        }
    }
}